home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3625 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: sn.no!not-for-mail
  2. From: christon@sn.no (Christopher Naas)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Scaling
  5. Date: 22 Feb 1996 17:41:21 +0100
  6. Organization: SN Internett
  7. Message-ID: <1588.6626T1061T1294@sn.no>
  8. NNTP-Posting-Host: sinsen.sn.no
  9. X-Newsreader: THOR 2.21 (Amiga;SOUP)
  10.  
  11. After having had a look at the BitMapScale (); routine, I'm a bit confused.
  12. bitscale->bsa_XDestFactor and bitscale->bsa_YDestFactor are defined as
  13. UWORD's. If I'm thinking correctly, then that means that you can only scale
  14. *up*, and only in powers of 2, i.e. 320->640 and so on. ??
  15.  
  16. My question is then; am I wrong? (Hope so), and if so, how do I scale *down*,
  17. and how do I define a scaling from i.e. 13x13 to 15x15 and the other way
  18. around, from 15x15 to 13x13?
  19.  
  20. I have the BitScaleArgs set as:
  21.  
  22. bitscale->bsa_SrcX          = 0;          // Source X
  23. bitscale->bsa_SrcY          = 0;          // Source Y
  24. bitscale->bsa_SrcWidth      = OWidth;     // Soruce Width
  25. bitscale->bsa_SrcHeight     = OHeight;    // Source Height
  26. bitscale->bsa_DestX         = 0;          // Destination X
  27. bitscale->bsa_DestY         = 0;          // Destination Y
  28. bitscale->bsa_DestWidth     = Width;      // Destination Width
  29. bitscale->bsa_DestHeight    = Height;     // Destination Height
  30. bitscale->bsa_XDestFactor   =           // Scale factor numerator X
  31. bitscale->bsa_YDestFactor   =           // Scale factor numerator Y
  32. bitscale->bsa_SrcBitMap     = BitMap;     // Source BitMap
  33. bitscale->bsa_DestBitMap    = newbitmap;  // Destination BitMap
  34. bitscale->bsa_Flags         = NULL;       // Reserved - has to be zero!
  35.  
  36. BitMapScale (bitscale);
  37.  
  38. ..which I guess is right. My problem lies in the X and Y DestFactor settings.
  39.  
  40.  
  41. HELP!! ;)
  42.  
  43. --
  44. Christopher Landmark Naas    o  EMail: christon@sn.no
  45. LoungeBar Development        o  WWW:   http://www.sn.no/~christon/
  46. Former Reg. Amiga Developer  o  IRC:   KarmaComa
  47.